Given(/^I am on the "([^"]*)"$/) do |page_name|
  visit to_page(page_name)
end
When(/^I click on "([^"]*)" button$/) do |button|
  click_on(button)
end
When(/^I enter "([^"]*)" into "([^"]*)"$/) do |text, element|
  fill_in element,:with =>text
end
Then(/^I should see "([^"]*)"$/) do |text|
  page.should have_text(text),"error"
end

When(/^I should see following links/) do |table|
  table.hashes.each do |row|
    links = row['links']
    page.should have_text (links)
  end
end